package com.song.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.List;

@Data
@Component
@TableName("t_user")
public class User implements Serializable {
   @TableId(value = "user_id",type = IdType.AUTO)
   private Integer id;
   @TableField(value = "user_name")
   private String userName;
   @TableField(value = "age")
   private Integer age;
   @TableField(value = "password")
   private String password;
   @TableField(exist = false)
   private Role role;
   @TableField(exist = false)
   private List<Permission> permissionList;

   @Override
   public String toString() {
      return "User{" + "id=" + id + ", userName='" + userName + '\'' + ", age=" + age + ", password='" + password + '\'' + ", role=" + role+ ", permissionList=" + permissionList + '}';
   }
}
